package com.yisu.auction.api.core.service.impl;

import com.yisu.auction.api.core.mapper.PrizeArchiveMapper;
import com.yisu.auction.api.core.service.IPrizeArchiveService;
import com.yisu.auction.api.domain.request.prizePackage.LatestAnnouncedRequest;
import com.yisu.auction.api.domain.request.prizePackage.PreviousRecordRequest;
import com.yisu.auction.api.domain.vo.goodsInfoPackageVos.LatestAnnouncedVo;
import com.yisu.auction.api.domain.vo.goodsInfoPackageVos.PreviousRecordVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * author: 赵杰
 * Business Description：
 * createTime：2017/9/15
 */
@Service("IPrizeArchiveService")
public class PrizeArchiveServiceImpl implements IPrizeArchiveService {
    @Resource
    private PrizeArchiveMapper prizeArchiveMapper;
    /**
     * author: 赵杰
     * Business Description：通过竞品ID往期记录
     *
     * @param previousRecordRequest 含prizeId
     * @return
     */
    @Override
    public List<PreviousRecordVo> getPreviousRecordListByPrizeId(PreviousRecordRequest previousRecordRequest) {
        return prizeArchiveMapper.getPreviousRecordListByPrizeId(previousRecordRequest);
    }

    /**
     * author: 赵杰
     * Business Description：获取最新揭晓列表
     *
     * @param latestAnnouncedRequest
     * @return
     */
    @Override
    public List<LatestAnnouncedVo> getLatestAnnouncedList(LatestAnnouncedRequest latestAnnouncedRequest) {
        return prizeArchiveMapper.getLatestAnnouncedList(latestAnnouncedRequest);
    }
}
